package com.rd.student.ruanjian.class1.duhang.day0801;

import java.util.Arrays;

public class Test02 {
    public static void main(String[] args) {
        //冒泡
        int[] arr = {60,77,33,55,88,90,99};

        for (int i = 0; i < arr.length - 1; i++) {
            for (int j = 0; j < arr.length - 1 ; j++) {
                if (arr[j] > arr[j + 1]){
                    int tmp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = tmp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
